<template>
    <nut-searchbar v-model="searchValue" clearable @change="search">
        <template #leftout>
            <span style="font-size: 14px;">上饶</span>
            <RectDown />
        </template>
        <template v-slot:leftin>
            <Search2 />
        </template>
    </nut-searchbar>
</template>
<script lang="ts">
import { toRefs, reactive } from 'vue';
import { Searchbar } from '@nutui/nutui-taro';
import mitt from "../../../utils/mitt";
import { Search2, RectDown } from '@nutui/icons-vue-taro';
export default {
    components: {
        'nut-searchbar': Searchbar,
        Search2,
        RectDown
    },
    setup() {
        const state = reactive({
            searchValue: ""
        });
        const search = () => {
            mitt.emit("keyword",)
        }
        return {
            ...toRefs(state), search
        };
    }
};
</script>
<style lang="scss" scoped></style>